<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Zhou Wenying
  Date: 2023/3/7
  Time: 14:23
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.css">


<style>

    /*导航栏*/
    ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    li {
        float: left;
    }

    ul li {
        float: left;
    }

    .head_top li a {
        display: block;
        color:  #666;
        text-align: center;
        padding: 14px 16px;
        text-decoration: none;
    }
    .all li a {
        display: block;
        color:  #666;
        text-align: center;
        padding-left: 10px;
        padding-right: 10px;
        text-decoration: none;
    }
    .all li {
        padding-bottom: 20px;
    }
    li a img{
        height: 150px;
    }
    .hot li a img {
        width: 20px;
    }

    form {
        padding: 9px;
    }
    /*选中类样式，文字颜色改变*/
    .head_top li a:hover {
        color: white;
        background-color: #4CAF50;
    }
    /* Make the image fully responsive */
    .carousel-inner img {
        width: 100%;
        height: 100%;
    }

    * {
        box-sizing: border-box;
    }

    body {
        font-family: Arial;
        padding: 10px;
        background: #f1f1f1;
    }

</style>
<ul class="head_top">
    <li><a class="active" href="#home">主页</a></li>
    <li><a href="/addBook">去售卖</a></li>
    <li><a href="#contact">联系我们</a></li>
    <li><a href="#about">关于我们</a></li>
    <li>
        <form class="form-inline">
            <input class="form-control" type="text" placeholder="搜索">
            <button class="btn btn-success" type="button">查询</button>
        </form>
    </li>
    <c:if test="${sessionScope.user != null}">
        <h5 style="float:right">${sessionScope.user.userNickname}</h5>
        <li ><a class="active" href="/order_list"> 我的订单</a></li>
        <li><a class="active" href="/user_center"> 个人中心</a></li>
        <%--<li><a href="book_cart.jsp">
            <span class="glyphicon glyphicon-shopping-cart <c:if test="${param.flag==8 }">active</c:if>" aria-hidden="true">
                <span class="card_num"><c:choose><c:when test="${empty order}">0</c:when><c:otherwise>${order.itemMap.size()}</c:otherwise></c:choose>
                </span></span></a></li>--%>
        <li><a class="active" href="/login_out"> 退出</a></li>
    </c:if>
    <c:if test="${sessionScope.user == null}">
        <li style="float:right"><a class="active" href="/register"> 注册</a></li>
        <li style="float:right"><a class="active" href="/login"> 登录</a></li>
    </c:if>

    <%--    <li style="float:right"><a class="active" href="/login">登录</a></li>--%>
</ul>
